package 剑指offer;

import noffer.base.TreeNode;

/**
 * @author zhangjunfei
 * @date 2023/9/1 17:10
 */
public class O_55_01 {
    public int maxDepth(TreeNode root) {
        if (root == null) {
            return 0;
        }

        return Math.max(1 + maxDepth(root.left), 1 + maxDepth(root.right));
    }
}
